/**
* @Description:    vue-t-tree
* @Author:         TSY
* @CreateDate:     2018/9/5 9:04
* @email:          t@tsy6.com
*/
<template>
    <t-tree :tree-data="pageData" @item-click="itemClick"></t-tree>
</template>

<script>
    import TTree from "./TTree";

    export default {
        name: "app",
        components: {TTree},
        data() {
            return {
                pageData: [{
                    "title": "巡查月度汇总",
                    "child": [{
                        "title": "待巡查",
                        "number": 2,
                        "isParent": true,
                        "child": [{
                            "state": 0,
                            "isClick": true,
                            "title": "2018-11-01（星期四）",
                            "number": 0,
                            "day": "2018-11-01"
                        }, {
                            "state": 0,
                            "isClick": true,
                            "title": "2018-11-02（星期五）",
                            "number": 0,
                            "day": "2018-11-02"
                        }, {
                            "state": 0,
                            "isClick": true,
                            "title": "2018-11-03（星期六）",
                            "number": 0,
                            "day": "2018-11-03"
                        }, {
                            "state": 0,
                            "isClick": true,
                            "title": "2018-11-04（星期日）",
                            "number": 0,
                            "day": "2018-11-04"
                        }, {
                            "state": 0,
                            "isClick": true,
                            "title": "2018-11-05（星期一）",
                            "number": 0,
                            "day": "2018-11-05"
                        }, {
                            "state": 0,
                            "isClick": true,
                            "title": "2018-11-06（星期二）",
                            "number": 0,
                            "day": "2018-11-06"
                        }, {
                            "state": 0,
                            "isClick": true,
                            "title": "2018-11-07（星期三）",
                            "number": 0,
                            "day": "2018-11-07"
                        }, {
                            "state": 0,
                            "isClick": true,
                            "title": "2018-11-08（星期四）",
                            "number": 0,
                            "day": "2018-11-08"
                        }, {
                            "state": 0,
                            "isClick": true,
                            "title": "2018-11-09（星期五）",
                            "number": 0,
                            "day": "2018-11-09"
                        }, {"state": 0, "isClick": true, "title": "2018-11-10（星期六）", "number": 2, "day": "2018-11-10"}]
                    }, {
                        "title": "已巡查",
                        "number": 0,
                        "isParent": true,
                        "child": [{
                            "state": 1,
                            "isClick": true,
                            "title": "2018-11-01（星期四）",
                            "number": 0,
                            "day": "2018-11-01"
                        }, {
                            "state": 1,
                            "isClick": true,
                            "title": "2018-11-02（星期五）",
                            "number": 0,
                            "day": "2018-11-02"
                        }, {
                            "state": 1,
                            "isClick": true,
                            "title": "2018-11-03（星期六）",
                            "number": 0,
                            "day": "2018-11-03"
                        }, {
                            "state": 1,
                            "isClick": true,
                            "title": "2018-11-04（星期日）",
                            "number": 0,
                            "day": "2018-11-04"
                        }, {
                            "state": 1,
                            "isClick": true,
                            "title": "2018-11-05（星期一）",
                            "number": 0,
                            "day": "2018-11-05"
                        }, {
                            "state": 1,
                            "isClick": true,
                            "title": "2018-11-06（星期二）",
                            "number": 0,
                            "day": "2018-11-06"
                        }, {
                            "state": 1,
                            "isClick": true,
                            "title": "2018-11-07（星期三）",
                            "number": 0,
                            "day": "2018-11-07"
                        }, {
                            "state": 1,
                            "isClick": true,
                            "title": "2018-11-08（星期四）",
                            "number": 0,
                            "day": "2018-11-08"
                        }, {
                            "state": 1,
                            "isClick": true,
                            "title": "2018-11-09（星期五）",
                            "number": 0,
                            "day": "2018-11-09"
                        }, {"state": 1, "isClick": true, "title": "2018-11-10（星期六）", "number": 0, "day": "2018-11-10"}]
                    }, {
                        "title": "未巡查",
                        "number": 28,
                        "isParent": true,
                        "child": [{
                            "state": 2,
                            "isClick": true,
                            "title": "2018-11-01（星期四）",
                            "number": 3,
                            "day": "2018-11-01"
                        }, {
                            "state": 2,
                            "isClick": true,
                            "title": "2018-11-02（星期五）",
                            "number": 3,
                            "day": "2018-11-02"
                        }, {
                            "state": 2,
                            "isClick": true,
                            "title": "2018-11-03（星期六）",
                            "number": 3,
                            "day": "2018-11-03"
                        }, {
                            "state": 2,
                            "isClick": true,
                            "title": "2018-11-04（星期日）",
                            "number": 3,
                            "day": "2018-11-04"
                        }, {
                            "state": 2,
                            "isClick": true,
                            "title": "2018-11-05（星期一）",
                            "number": 3,
                            "day": "2018-11-05"
                        }, {
                            "state": 2,
                            "isClick": true,
                            "title": "2018-11-06（星期二）",
                            "number": 3,
                            "day": "2018-11-06"
                        }, {
                            "state": 2,
                            "isClick": true,
                            "title": "2018-11-07（星期三）",
                            "number": 3,
                            "day": "2018-11-07"
                        }, {
                            "state": 2,
                            "isClick": true,
                            "title": "2018-11-08（星期四）",
                            "number": 3,
                            "day": "2018-11-08"
                        }, {
                            "state": 2,
                            "isClick": true,
                            "title": "2018-11-09（星期五）",
                            "number": 3,
                            "day": "2018-11-09"
                        }, {"state": 2, "isClick": true, "title": "2018-11-10（星期六）", "number": 1, "day": "2018-11-10"}]
                    }, {
                        "title": "已补卡",
                        "number": 0,
                        "isParent": true,
                        "isClick": true,
                        "child": [{
                            "state": 3,
                            "isClick": true,
                            "title": "2018-11-01（星期四）",
                            "number": 0,
                            "day": "2018-11-01"
                        }, {
                            "state": 3,
                            "isClick": true,
                            "title": "2018-11-02（星期五）",
                            "number": 0,
                            "day": "2018-11-02"
                        }, {
                            "state": 3,
                            "isClick": true,
                            "title": "2018-11-03（星期六）",
                            "number": 0,
                            "day": "2018-11-03"
                        }, {
                            "state": 3,
                            "isClick": true,
                            "title": "2018-11-04（星期日）",
                            "number": 0,
                            "day": "2018-11-04"
                        }, {
                            "state": 3,
                            "isClick": true,
                            "title": "2018-11-05（星期一）",
                            "number": 0,
                            "day": "2018-11-05"
                        }, {
                            "state": 3,
                            "isClick": true,
                            "title": "2018-11-06（星期二）",
                            "number": 0,
                            "day": "2018-11-06"
                        }, {
                            "state": 3,
                            "isClick": true,
                            "title": "2018-11-07（星期三）",
                            "number": 0,
                            "day": "2018-11-07"
                        }, {
                            "state": 3,
                            "isClick": true,
                            "title": "2018-11-08（星期四）",
                            "number": 0,
                            "day": "2018-11-08"
                        }, {
                            "state": 3,
                            "isClick": true,
                            "title": "2018-11-09（星期五）",
                            "number": 0,
                            "day": "2018-11-09"
                        }, {"state": 3, "isClick": true, "title": "2018-11-10（星期六）", "number": 0, "day": "2018-11-10"}]
                    }]
                }, {
                    "title": "日任务月度汇总",
                    "child": [{"title": "已巡查", "number": 0}, {"title": "待巡查", "number": 0}]
                }, {
                    "title": "周任务月度汇总",
                    "child": [{"title": "已巡查", "number": 0}, {"title": "待巡查", "number": 2}]
                }, {"title": "月任务月度汇总", "child": [{"title": "已巡查", "number": 0}, {"title": "待巡查", "number": 0}]}]
            }
        },
        mounted() {

        },
        methods: {
            itemClick(data) {
                console.log(data);
            }
        }
    }
</script>

<style lang="stylus">
    @import "./style/reset.styl"

</style>
